Skip to content

feat(rpc): Implement z_importaddress#406

Merged
nullcopy merged 1 commit intomainfrom
feat/z_importaddress
Apr 1, 2026
Merged

feat(rpc): Implement z_importaddress#406
nullcopy merged 1 commit intomainfrom
feat/z_importaddress

Conversation

@nullcopy
Copy link
Copy Markdown
Contributor

This PR implements z_importaddress for standalone P2PKH and P2SH address import. I didn't see an existing implementation of z_importaddress in zcashd, so I tried to use my best judgement when designing it here.

The commit patches librustzcash to use the latest commit, which supports the new standalone P2SH address import API.

Supercedes #399
Resolves #272
Resolves COR-326

@linear
Copy link
Copy Markdown

linear bot commented Mar 27, 2026

@nullcopy nullcopy force-pushed the feat/z_importaddress branch from 7d73197 to ce67aa1 Compare March 31, 2026 01:21
@nullcopy
Copy link
Copy Markdown
Contributor Author

Force-pushed ef21adc to rebase onto librustzcash dependency bumps

@nullcopy nullcopy requested a review from str4d March 31, 2026 01:25
@nullcopy nullcopy force-pushed the feat/z_importaddress branch from ce67aa1 to 7fd5d6a Compare March 31, 2026 20:18
@nullcopy
Copy link
Copy Markdown
Contributor Author

nullcopy commented Mar 31, 2026

Force-pushed 7fd5d6a to rebase on main, now that #410 has merged

Copy link
Copy Markdown
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK with nonblocking comments.

Add the `z_importaddress` RPC method, which accepts a hex-encoded
public key (P2PKH) or redeem script (P2SH) and imports the
corresponding transparent address into the wallet. After import it
optionally rescans for UTXOs belonging to all wallet transparent
addresses.
@nullcopy nullcopy force-pushed the feat/z_importaddress branch from 7fd5d6a to bd7e7bb Compare April 1, 2026 16:50
@nullcopy
Copy link
Copy Markdown
Contributor Author

nullcopy commented Apr 1, 2026

Force-pushed to improve misleading error message

@nullcopy nullcopy requested a review from nuttycom April 1, 2026 16:51
Copy link
Copy Markdown
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK bd7e7bb

@nullcopy nullcopy merged commit b7b080f into main Apr 1, 2026
24 of 25 checks passed
@nullcopy nullcopy deleted the feat/z_importaddress branch April 1, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for storage and handling of P2SH redeem scripts.

3 participants